# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-reedsolo
pkgver=1.5.4
pkgrel=1
pkgdesc="Pure-Python implementation of a Reed–Solomon codec"
url="https://pypi.org/project/reedsolo/"
license="MIT"
arch="all"
depends="python3"
makedepends="python3-dev cython py3-setuptools"
checkdepends="py3-pytest"
source="https://github.com/tomerfiliba/reedsolomon/archive/v$pkgver/py3-reedsolo-$pkgver.tar.gz
	python3.10.patch"
builddir="$srcdir/reedsolomon-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib*)" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}

sha512sums="
c738f817c8f536ee86e5bcd3de73a4cf6a3e606ba196a359b6c09e7372dba31316ddb8b134d7c335100e4c2ff0158ff07caa35fee9bc20768bde23cd803e274a  py3-reedsolo-1.5.4.tar.gz
297e3da4a5ac2073ff589305adf4f70e0027d36c54914e7772e148f90002c5ae1d39c1a2cadb0a099c22d170b07e65ffb1cd5063de408f16863dd7530f20e673  python3.10.patch
"
